<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <ul v-for="student in students" :key="student.id">
            <li>ID：{{ student.id }}</li>
            <li>Name：{{ student.name }}</li>
            <li>Age：{{ student.age }}</li>
            <li v-if="student.gender==1">性别：男</li>
            <li v-else-if="student.gender==0">性别：女</li>
            <li v-else>性别：未知</li>
        </ul>
    </div>
    <!-- <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script> -->
    <script src="../assets/vue3.js"></script>
    <script>
        const app = Vue.createApp({
            data() {
                return {
                    students: [
                        { id: 1, name: '小明', age: 22, gender: 1 },
                        { id: 2, name: '小华', age: 33, gender: 0 },
                        { id: 3, name: '小胖', age: 44 }
                    ]
                }
            },
        });
        app.mount('#app');
    </script>
</body>

</html>